<template>
  <div class="attention_main">
    <div class="mincard mincard_Width">
      <nuxt-link
        v-for="(item, index) in attentionList"
        :key="index"
        :to="item.path"
        :class="currentIndex === index ? 'nuxt-link-active' : ''"
      >
        {{ item.content }}
      </nuxt-link>
    </div>
    <div class="attention_warpper">
      <keep-alive>
        <router-view></router-view>
      </keep-alive>
    </div>
  </div>
</template>

<script>
export default {
  name: "toExamine",
  data() {
    return {
      currentIndex: "",
      attentionList: [
        { content: "企业审核表", path: "/VIP/toExamine/enterpriseAuditForm" },
      ],
    };
  },
  watch: {
    $route: {
      deep: true,
      immediate: true,
      hanld(val) {
        let index = this.attentionList.findIndex((el) => el.path === val.path);
        this.currentIndex = index;
        console.log(index);
      },
    },
  },
  
};
</script>

<style lang="less" scoped>
.attention_main {
  display: flex;
  flex-direction: column;
  .mincard_Width {
    width: 900px;
    background-color: #fff;
    padding: 0 20px;
    a {
      height: 100%;
      display: flex;
      align-items: center;
      margin: 0 20px;
      font-size: 16px;
      color: #000;
      &.nuxt-link-active {
        color: #44a2ff;
        position: relative;
        &::after {
          content: "";
          width: 40px;
          height: 5px;
          background-color: #44a2ff;
          position: absolute;
          bottom: 0;
          left: 50%;
          right: 50%;
          transform: translateX(-50%);
        }
      }
    }
  }
  .attention_warpper {
    margin-top: 10px;
  }
}
</style>
